Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BC-5119-Prevent-creating-new-neXboards (Server) #4522

Closed
wants to merge 16 commits into from

Conversation

Michaellinaresxk
Copy link
Contributor

@Michaellinaresxk Michaellinaresxk commented Nov 5, 2023

Description

This is the server implementation to exclude nexboard when user try to copy and share courses.

Links to Tickets or other pull requests

https://ticketsystem.dbildungscloud.de/browse/BC-5119
hpi-schul-cloud/schulcloud-client#3313

Changes

  • I removed the nextBoard in the copy course process.

Datasecurity

Deployment

New Repos, NPM pakages or vendor scripts

Approval for review

  • DEV: If api was changed - generate-client:server was executed in vue frontend and changes were tested and put in a PR with the same branch name.
  • QA: In addition to review, the code has been manually tested (if manual testing is possible)
  • All points were discussed with the ticket creator, support-team or product owner. The code upholds all quality guidelines from the PR-template.

Notice: Please remove the WIP label if the PR is ready to review, otherwise nobody will review it.

@Michaellinaresxk Michaellinaresxk added the WIP This feature branch is in progress, do not merge into master. label Nov 5, 2023
@Michaellinaresxk Michaellinaresxk changed the title Created functionality to ignore copy nextboard. BC-5119-Prevent-creating-new-neXboards (Server) Nov 5, 2023
@Michaellinaresxk Michaellinaresxk force-pushed the BC-5119-Prevent-creating-new-neXboards branch from 0049531 to 99428b9 Compare November 14, 2023 12:58
Copy link
Contributor

@bn-pass bn-pass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you've missed very important place, which also has some flag to turn on/off copying of the Nexboard, but it's using the general flag for enabling/disabling the Nexboard (which has to stay enabled as we still want to keep the existing Nexboards usable). Please take a look here:

if (element.component === ComponentType.NEXBOARD && nexboardEnabled) {
. Probably you'll have to modify it to use another flag to just disable/enable only the copying of the Nexboards, not the whole Nexboard functionality.

@Michaellinaresxk Michaellinaresxk force-pushed the BC-5119-Prevent-creating-new-neXboards branch 2 times, most recently from 53c0136 to 23027d4 Compare November 16, 2023 21:12
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert these changes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert these changes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remember to use prettier.

@Michaellinaresxk Michaellinaresxk force-pushed the BC-5119-Prevent-creating-new-neXboards branch from fe8e6cb to 8a4c7ed Compare November 17, 2023 11:23
Copy link
Contributor

@virgilchiriac virgilchiriac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • pls cleanup (see also the linter test)
    I am not sure if this is the most elegant way... Rather than delete code and such, I would introduce a feature flag just for the nexboard copy. Perhaps we will need nexboard back in the near future, or some instances will change their mind and will want to keep it including the copying...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert formating changes on this file

@Michaellinaresxk Michaellinaresxk removed the WIP This feature branch is in progress, do not merge into master. label Nov 19, 2023
@Michaellinaresxk Michaellinaresxk force-pushed the BC-5119-Prevent-creating-new-neXboards branch from b4f7300 to 8c51e64 Compare November 19, 2023 20:53
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@Michaellinaresxk Michaellinaresxk force-pushed the BC-5119-Prevent-creating-new-neXboards branch from e65731b to 1faba72 Compare November 20, 2023 10:34
Copy link
Contributor

@virgilchiriac virgilchiriac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plus some cleanup still needs to happen
the .vscode folder should not be chnged
the .DS_Store files - you don't need to touch those

@Michaellinaresxk Michaellinaresxk force-pushed the BC-5119-Prevent-creating-new-neXboards branch from 195c5bc to e99e428 Compare November 20, 2023 12:00
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

restore the file

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

restore the file

@@ -46,13 +46,23 @@ export class CourseCopyService {
// copy course and board
const courseCopy = await this.copyCourseEntity({ user, originalCourse, copyName });
const boardStatus = await this.boardCopyService.copyBoard({ originalBoard, destinationCourse: courseCopy, user });
const filteredBoardStatus = this.filterOutNeXboardFromCopyStatus(boardStatus);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too should use the new feature flag condition...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

restore file

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

restore file

@@ -227,7 +228,7 @@ export class LessonCopyService {
copiedContent.push(linkContent);
copiedContentStatus.push(embeddedTaskStatus);
}
if (element.component === ComponentType.NEXBOARD && nexboardEnabled) {
if (element.component === ComponentType.NEXBOARD && nexboardEnabled && copyNexboardEnabled) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the previous solution with status NOT_DOING was better
so, why not applying the condition just at that level instead of skiping the who thing?
the correct behaviour is to inform the client that nexboard is not copied (on purpose).

@Michaellinaresxk Michaellinaresxk force-pushed the BC-5119-Prevent-creating-new-neXboards branch from 93914c2 to 5db47fd Compare November 21, 2023 09:17
@davwas davwas deleted the BC-5119-Prevent-creating-new-neXboards branch December 8, 2023 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants